package com.platform.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.platform.dao.ApiInvoiceMapper;
import com.platform.entity.InvoiceVo;

/**
 * 发票表Service实现类
 *
 * @author czj
 * @email 729618941@qq.com
 * @date 2018-11-19 17:32:03
 */
@Service
public class ApiInvoiceService {
    @Autowired
    private ApiInvoiceMapper invoiceDao;


    public InvoiceVo queryObject(Integer id) {
        return invoiceDao.queryObject(id);
    }


    public List<InvoiceVo> queryList(Map<String, Object> map) {
        return invoiceDao.queryList(map);
    }


    public int queryTotal(Map<String, Object> map) {
        return invoiceDao.queryTotal(map);
    }


    public int save(InvoiceVo invoice) {
        return invoiceDao.save(invoice);
    }


    public int update(InvoiceVo invoice) {
        return invoiceDao.update(invoice);
    }


    public int delete(Integer id) {
        return invoiceDao.delete(id);
    }


    public int deleteBatch(Integer[] ids) {
        return invoiceDao.deleteBatch(ids);
    }

    public void updateIsDefault(@Param("user_id") Long user_id) {
        invoiceDao.updateIsDefault(user_id);
    }


    public InvoiceVo queryDefaultObject(@Param("user_id") Long user_id) {
        return invoiceDao.queryDefaultObject(user_id);
    }

}
